home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / ncurses-5.3.lha / ncurses-5.3 / Ada95 / src / terminal_interface-curses-text_ < prev    next >
Text File  |  2002-10-24  |  6KB  |  138 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                           GNAT ncurses Binding                           --
  4. --                                                                          --
  5. --                     Terminal_Interface.Curses.Text_IO                    --
  6. --                                                                          --
  7. --                                 S P E C                                  --
  8. --                                                                          --
  9. ------------------------------------------------------------------------------
  10. -- Copyright (c) 1998 Free Software Foundation, Inc.                        --
  11. --                                                                          --
  12. -- Permission is hereby granted, free of charge, to any person obtaining a  --
  13. -- copy of this software and associated documentation files (the            --
  14. -- "Software"), to deal in the Software without restriction, including      --
  15. -- without limitation the rights to use, copy, modify, merge, publish,      --
  16. -- distribute, distribute with modifications, sublicense, and/or sell       --
  17. -- copies of the Software, and to permit persons to whom the Software is    --
  18. -- furnished to do so, subject to the following conditions:                 --
  19. --                                                                          --
  20. -- The above copyright notice and this permission notice shall be included  --
  21. -- in all copies or substantial portions of the Software.                   --
  22. --                                                                          --
  23. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
  24. -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
  25. -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
  26. -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
  27. -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
  28. -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
  29. -- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
  30. --                                                                          --
  31. -- Except as contained in this notice, the name(s) of the above copyright   --
  32. -- holders shall not be used in advertising or otherwise to promote the     --
  33. -- sale, use or other dealings in this Software without prior written       --
  34. -- authorization.                                                           --
  35. ------------------------------------------------------------------------------
  36. --  Author:  Juergen Pfeifer, 1996
  37. --  Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en
  38. --  Version Control:
  39. --  $Revision: 1.12 $
  40. --  Binding Version 01.00
  41. ------------------------------------------------------------------------------
  42. with Ada.Text_IO;
  43. with Ada.IO_Exceptions;
  44.  
  45. package Terminal_Interface.Curses.Text_IO is
  46.  
  47.    use type Ada.Text_IO.Count;
  48.    subtype Count is Ada.Text_IO.Count;
  49.    subtype Positive_Count is Count range 1 .. Count'Last;
  50.  
  51.    subtype Field is Ada.Text_IO.Field;
  52.    subtype Number_Base is Integer range 2 .. 16;
  53.  
  54.    type Type_Set is (Lower_Case, Upper_Case, Mixed_Case);
  55.  
  56.    --  For most of the routines you will see a version without a Window
  57.    --  type parameter. They will operate on a default window, which can
  58.    --  be set by the user. It is initially equal to Standard_Window.
  59.  
  60.    procedure Set_Window (Win : in Window);
  61.    --  Set Win as the default window
  62.  
  63.    function Get_Window return Window;
  64.    --  Get the current default window
  65.  
  66.    procedure Flush (Win : in Window);
  67.    procedure Flush;
  68.  
  69.    --------------------------------------------
  70.    -- Specification of line and page lengths --
  71.    --------------------------------------------
  72.  
  73.    --  There are no set routines in this package. I assume, that you allocate
  74.    --  the window with an appropriate size.
  75.    --  A scroll-window is interpreted as an page with unbounded page length,
  76.    --  i.e. it returns the conventional 0 as page length.
  77.  
  78.    function Line_Length (Win : in Window) return Count;
  79.    function Line_Length return Count;
  80.  
  81.    function Page_Length (Win : in Window) return Count;
  82.    function Page_Length return Count;
  83.  
  84.    ------------------------------------
  85.    -- Column, Line, and Page Control --
  86.    ------------------------------------
  87.    procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1);
  88.    procedure New_Line (Spacing : in Positive_Count := 1);
  89.  
  90.    procedure New_Page (Win : in Window);
  91.    procedure New_Page;
  92.  
  93.    procedure Set_Col (Win : in Window;  To : in Positive_Count);
  94.    procedure Set_Col (To : in Positive_Count);
  95.  
  96.    procedure Set_Line (Win : in Window; To : in Positive_Count);
  97.    procedure Set_Line (To : in Positive_Count);
  98.  
  99.    function Col (Win : in Window) return Positive_Count;
  100.    function Col return Positive_Count;
  101.  
  102.    function Line (Win : in Window) return Positive_Count;
  103.    function Line return Positive_Count;
  104.  
  105.    -----------------------
  106.    -- Characters-Output --
  107.    -----------------------
  108.  
  109.    procedure Put (Win  : in Window; Item : in Character);
  110.    procedure Put (Item : in Character);
  111.  
  112.    --------------------
  113.    -- Strings-Output --
  114.    --------------------
  115.  
  116.    procedure Put (Win  : in Window; Item : in String);
  117.    procedure Put (Item : in String);
  118.  
  119.    procedure Put_Line
  120.      (Win  : in Window;
  121.       Item : in String);
  122.  
  123.    procedure Put_Line
  124.      (Item : in String);
  125.  
  126.    --  Exceptions
  127.  
  128.    Status_Error : exception renames Ada.IO_Exceptions.Status_Error;
  129.    Mode_Error   : exception renames Ada.IO_Exceptions.Mode_Error;
  130.    Name_Error   : exception renames Ada.IO_Exceptions.Name_Error;
  131.    Use_Error    : exception renames Ada.IO_Exceptions.Use_Error;
  132.    Device_Error : exception renames Ada.IO_Exceptions.Device_Error;
  133.    End_Error    : exception renames Ada.IO_Exceptions.End_Error;
  134.    Data_Error   : exception renames Ada.IO_Exceptions.Data_Error;
  135.    Layout_Error : exception renames Ada.IO_Exceptions.Layout_Error;
  136.  
  137. end Terminal_Interface.Curses.Text_IO;
  138.